A flash memory is a type of non-volatile memory that uses floating gate transistors. The floating gate transistors can be programmed, erased, or read. Generally, a flash memory has two modes of operation, a command mode and a memory mode. The memory mode allows for reading the floating gate transistor memory cells and the command mode is for programming or erasing the memory cells. Also, in the command mode, control or status registers may be read, suspend or resume program/erase operations, and terminate command mode.
A problem with flash memory is that a program or erase operation requires significantly more time to complete than a read operation. Because of this, some flash memories allow for a read operation to occur at the same time as a command mode operation. Examples of commands that are read from the control registers include manufacturer identification, device identification, sector protect verify, program, etc.
A need then exists to distinguish from a command mode read and a memory mode read. For example, in the case of an interrupt, a typical sequence for a processor is to fetch the interrupt vector from a memory location. The interrupt vector tells the processor where to get the first instruction of the interrupt service routine and then the processor fetches the first instruction of the interrupt service routine. The interrupt may be accomplished by a hardware signal to the processor indicating that an interrupt needs to occur, an d can occur at any time. If the interrupt occurs while the flash is in command mode, the read of the first instruction of the interrupt service routine may occur between a command to read a control or status register and the read of the control or status register. This would cause the first instruction retrieved to use the value of the control or status register instead of the instruction. This would result in unpredictable system behavior.
Therefore, there exists a need for distinguishing between a command mode read and a memory mode read in a flash memory system.